package hxy.scan.server.lisenter;

import hxy.scan.server.dao.model.CustomerModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RabbitListener(queues = "cupb")
public class RabbitMqLisenter {

    @RabbitHandler
    public void process(String message) {
       String 字符串 = "CustomerModel(name=张三, phone=null, address=安徽, reputation=null, note=null, registerDate=null)";
        int length = message.length();
        log.info("Receiver 字符串: {}", message);
    }

    @RabbitHandler
    public void process(CustomerModel message) {
        String name = message.getName();
        log.info("Receiver 对象: {}", message);
    }

}
